
<script type="text/html" data-help-name="ui-event">
    <p>
        Tracks client-side events in the Node-RED Dashboard, and reports them into the Node-RED Editor.
    </p>
    <p>
        This widget doesn't render any content into your Dashboard. Instead, it listens for user-driven behaviour and events in your Dashboard and emits accordingly into the Node-RED Editor when those events have taken place.
    </p>
    <p>
        Current, supported events are:
    </p>
    <ul>
        <li>
            <b>$pageview</b> - Emits whenever a user views a page.
        </li>
        <li>
            <b>$pageleave</b> - Emits whenever a user leaves a page.
        </li>
    </ul>
    <p>An example output <code>msg</code> is as follows:</p>
        <pre>msg = {
    topic: '$pageview',
    socketid: '1234',
    socketip: '127.0.0.1'
    payload: {
        page: {
            name: 'Page Name',
            path: '/page/path'
            id: '1234',
            theme: 'dark',
            layout: 'default',
            _groups: []
        }
    }
}</pre>
</script>